import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { getStudentById } from '../services/student'

export const useStudentStore = defineStore('student', () => {
  const updateVisible = ref(false);
  const student = ref({});

  async function fetchStudent(id){
    const res = await getStudentById(id);
    student.value = res.data;
  }
  return { updateVisible,student ,fetchStudent}
})
